#/bin/bash
# mvn 打包镜像
mvn clean package

VERSION=$(date +%Y%m%d%H%M%S)
JOB_NAME=backend-base
IMAGE_NAME=hub.smart.orhoncloud.com/smartcampus/${JOB_NAME}:${VERSION}
echo "building images ${IMAGE_NAME}"
docker build -t ${IMAGE_NAME} .
docker push ${IMAGE_NAME}
echo "镜像推送成功"
